<!--[if lt IE 7]>
<div class="ie6_error">还在用<strong>漏洞百出的IE6浏览器</strong>么？为了您的网络安全，请升级浏览器 <a target="_blank"
                                                                           href="http://browsehappy.com">立即升级</a>
</div>
<![endif]-->

<meta charset="utf-8">
<title>首页-文具1号</title>
<meta name="description"
      content="文具1号作为上海办公用品供货商公司,专为世界500强企业及SOHO办公族提供网上商城一站式办公耗材批发及采购服务,一站式选购办公日用文具用品,厂家直销,好货又便宜【阳光采购就上文具1号 阳光价格 老板放心 品质保障 员工省力】"/>
<meta name="keywords" content="办公用品,办公文具,办公文具网站,文具网站,办公用品网,文具采购网,金万年"/>
<meta name="copyright" content="上海易推信息科技有限公司"/>
<meta name="renderer" content="webkit">
<base href="<?php echo base_url(); ?>"/>
<link rel="shortcut icon" href="favicon.ico"/>
<link rel="stylesheet" type="text/css" href="public/css/base.css"/>
<link rel="stylesheet" type="text/css" href="public/css/common.css"/>
<link rel="stylesheet" type="text/css" href="public/css/index.css"/>
<link type="text/css" rel="stylesheet" href="public/css/owl.carousel.css">
<link type="text/css" rel="stylesheet" href="public/css/owl.theme.css">

<!--[if lte IE 9]>
<script type="text/javascript" src="public/js/html5shiv-printshiv-3.js"></script>
<![endif]-->


<!--common - head -->
<?php $this->load->view('common/header.php'); ?>
<!--common - head end-->

<div class="container mt20 bg-padding-inside">
    <div class="workbench-container">
        <p class="path-tit">
            <em class="color-red">工作台</em>＞了解工作台
        </p>

        <div class="workbench-cont container-line">
            <p class="workbench-title">所属公司</p>
            <div class="company-type company-type2 <?php if (!empty($company['company'])): ?> none <?php endif; ?>">
                <a href="javascript:;" class="workbench-edit-btn-company workbench-edit-btn-submit">保存</a>
                <p class="company-p">
                    欢迎进入工作台，工作台是专为企业用户打造，用于查看会员身份，审批订单和申请成为账期用户
                </p>
                <p class="company-p">
                    <span class="company-name-tit">请输入您的公司名称：</span>
                    <input type="text" class="company-name-input" placeholder="请输入公司全称">
                </p>
            </div>
            <!--未输入公司-->


            <?php if (!empty($company['company'])): ?>
                <div class="company-type company-type1 ">
                    <a href="javascript:;"
                       class="workbench-edit-btn workbench-edit-btn-company workbench-edit-btn-change ">修改</a>
                    <p class="company-p company-y">
                        <span class="company-name"><?php echo $company['company'] ?></span>你好，
                    </p>
                    <p class="company-p">
                        欢迎进入工作台，工作台是专为企业用户打造，用于查看会员身份，审批订单和申请成为账期用户
                    </p>
                </div>
                <!--已输入公司-->
            <?php endif; ?>

        </div>

        <div class="workbench-cont">
            <p class="workbench-title">成本中心</p>
            <a href="<?php echo base_url('cost_center/create_cost_center_index'); ?>" class="workbench-edit-btn">去创建</a>
            <div class="workbench-cont-item-wrapper">
                <div class="workbench-cont-item">
                    <img src="<?php echo base_url(); ?>public/images/page/id/1.png" alt="">
                    <span class="workbench-cont-item-intro">
              01/  打开成本中心
            </span>
                </div>
                <div class="workbench-cont-item">
                    <img src="<?php echo base_url(); ?>public/images/page/id/2.png" alt="">
                    <span class="workbench-cont-item-intro">
             02/  点击新建
            </span>
                </div>
                <div class="workbench-cont-item">
                    <img src="<?php echo base_url(); ?>public/images/page/id/3.png" alt="">
                    <span class="workbench-cont-item-intro">
              03/  填写资料
            </span>
                </div>
            </div>

        </div>
        <div class="workbench-cont">
            <p class="workbench-title">账期支付</p>
            <a href="<?php echo base_url('customer/admin_apply_for_period_user_index'); ?>" class="workbench-edit-btn">去创建</a>
            <div class="workbench-cont-banner">
                <img src="<?php echo base_url(); ?>public/images/page/id/4.png" alt="">
            </div>
        </div>
        <?php if ($this->session->customer_id && $_SESSION['customer_info']['identity'] == 1): ?>
            <div class="workbench-cont" style="">
                <p class="workbench-title">多地址下单</p>
                <a href="<?php echo base_url('multiple_address'); ?>" class="workbench-edit-btn">去下单</a>
                <div class="workbench-cont-item-wrapper">
                    <div class="workbench-cont-item">
                        <img src="<?php echo base_url(); ?>public/images/page/id/5.png" alt="">
                        <span class="workbench-cont-item-intro">
              01/  下载模板
            </span>
                    </div>
                    <div class="workbench-cont-item">
                        <img src="<?php echo base_url(); ?>public/images/page/id/6.png" alt="">
                        <span class="workbench-cont-item-intro">
             02/  上传订单
            </span>
                    </div>
                    <div class="workbench-cont-item">
                        <img src="<?php echo base_url(); ?>public/images/page/id/7.png" alt="">
                        <span class="workbench-cont-item-intro">
              03/  匹配成功
            </span>
                    </div>
                </div>
            </div>

        <?php endif; ?>
    </div>
</div>

<?php $this->load->view('common/bottom.php'); ?>

<script type="text/javascript" src="public/js/jquery.min.js"></script>
<script type="text/javascript" src="public/js/index.js"></script>
<script type="text/javascript" src="public/js/owl.carousel.min.js"></script>

<script type="text/javascript">
    $(function () {
        $(".workbench-edit-btn-submit").click(function () {
            var companyName = $(".company-name-input").val();
            if (!companyName) {
                alert("请输入公司全称");
                return false
            } else {
                // var reg=/^[A-Za-z0-9\_\-\(\)（）\u4e00-\u9fa5]+$/;//中文，英文和数字
                if (!/^[A-Za-z0-9\_\-\(\)（）\u4e00-\u9fa5]+$/.test(companyName)) {
                    layer.alert('请输入中英文，数字,中下划线,（）","()"的组合');
                    return false;
                }
                if ($.trim(companyName).length < 4 || $.trim(companyName).length > 40) {
                    layer.alert('公司名称请输入4-40个字符');
                    return false;
                }
                $('.company-name').html(companyName);
                var company = companyName;
                $.ajax({
                    type: "post",
                    dataType: "json",
                    url: "index/index_desk",
                    data: {'company': company},
                    success: function (data) {
                        if (data.code == 0) {
                            $(".company-type2").hide();
                            $(".company-type1").show();
                            var str = '';
                            layer.msg(data.msg);
                            if (data.data != "") {
                                str += '   <p class="workbench-title" >所属公司</p>';
                                str += '  <div class="company-type company-type1 ">';
                                str += '   <a href="javascript:;" class="workbench-edit-btn workbench-edit-btn-company workbench-edit-btn-change ">修改</a>';
                                str += '   <p class="company-p company-y">';
                                str += '<span class="company-name">' + data.data + '</span>你好，';
                                str += '    </p>';
                                str += '    <p class="company-p">欢迎进入工作台，工作台是专为企业用户打造，用于查看会员身份，审批订单和申请成为账期用户';
                                str += '     </p>';
                                str += '   </div>';
                                $(".container-line").html(str);
                            }
                        } else {
                            // layer.msg(data.msg);
                            location.href = shop_url + 'mMLogin.html';
                        }
                    }
                })
            }
        });

        $(".workbench-edit-btn-change").click(function () {
            var companyName = $(".company-name").text();
            $(this).parent().hide();
            $(".company-type2").show();
            $(".company-name-input").val(companyName)
        });
    });

</script>
